var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0}), (o.huaweiAdConfig = o.EPlatform = void 0);
var n,
    a = e("Base64"),
    i = e("MiniGameSDK"),
    r = e("AdCenter"),
    s = e("LoadRes");
(function (e) {
    (e[(e.test = 0)] = "test"),
        (e[(e.VIVO = 1041108)] = "VIVO"),
        (e[(e.OPPO = 1018142)] = "OPPO"),
        (e[(e.TikTok = 1021154)] = "TikTok"),
        (e[(e.QQ = 4)] = "QQ"),
        (e[(e.WX = 5)] = "WX"),
        (e[(e.HUAWEI = 6)] = "HUAWEI"),
        (e[(e.UC = 7)] = "UC"),
        (e[(e.M4399box = 8)] = "M4399box"),
        (e[(e.M4399mini = 9)] = "M4399mini"),
        (e[(e.No_AD = 99)] = "No_AD");
})((n = o.EPlatform || (o.EPlatform = {})));
var l = (function () {
    function e() {}
    return (
        Object.defineProperty(e, "platform", {
            get: function () {
                return this._platform;
            },
            set: function (e) {
                this._platform = e;
            },
            enumerable: !1,
            configurable: !0
        }),
        (e.stringHasSpace = function (e) {
            return null == e || -1 != e.indexOf(" ");
        }),
        (e.getAdConfig = function () {
            var t = "https://adconfig-1305586391.cos.ap-guangzhou.myqcloud.com/";
            switch (this.channelId) {
                case n.VIVO:
                    t += "vivo";
                    break;
                case n.OPPO:
                    t += "oppo";
                    break;
                case n.TikTok:
                    t += "tiktok";
                    break;
                case n.WX:
                    t += "wx";
                    break;
                case n.HUAWEI:
                    t += "hw";
                    break;
                case n.UC:
                    t += "uc";
                    break;
                case n.M4399box:
                    t += "m4399box";
                    break;
                case n.M4399mini:
                    t += "m4399mini";
                    break;
                default:
                    return void console.log("======sdkConfig======getAdConfig======渠道错误====", this.channelId);
            }
            (t += "/" + e.platform),
                (t += "/adConfig.json"),
                (t += "?t=" + Date.now()),
                console.log("====sdkConfig===", t),
                s.default.loadResCustom(
                    t,
                    function (e) {
                        console.log("====ChaoQiGameSDK======adConfig====", e);
                        var t = new a.default();
                        t.Base64();
                        var o = e.json.json,
                            n = JSON.parse(t.decode(o));
                        (r.default.getInstance().adConfig = n), r.default.getInstance().startLoadAd();
                    },
                    function () {
                        cc.sys.platform === cc.sys.VIVO_GAME || cc.sys.platform === cc.sys.OPPO_GAME
                            ? i.default.showDialog("提示", "游戏配置获取错误\n请稍后再试", function () {
                                  i.default.exitApplication();
                              })
                            : cc.sys.platform === cc.sys.HUAWEI_GAME && r.default.getInstance().huaweiManualModel();
                    }
                );
        }),
        (e.appId = "104713831"),
        (e.channelId = 0),
        e
    );
})();
(o.default = l),
    (o.huaweiAdConfig = {
        openHuaweiManualModel: !1,
        ID_SystemBanner: "x0kvs12iu6",
        ID_SystemInters: "l7s7x17w20",
        ID_Native: "testu7m3hc4gvm",
        ID_Video: "testx9dtjwj8hp",
        SW_SystemBanner: !0,
        SW_SystemInters: !1,
        SW_Video: !0,
        SW_Native: !0,
        SW_NativeBanner: !0,
        SW_NativeInters: !0,
        SW_SystemBannerFirst: !0,
        NUM_BannerUpdateTime: 60,
        NUM_NativeIntersP: 0,
        SW_IntersBaseControl: !0,
        NUM_IntersStart: 1,
        NUM_IntersIntervalNum: 3,
        NUM_IntersIntervalTime: 0,
        NUM_IntersDelayTime: 0,
        NUM_IntersDelayP: 0
    });
